<script setup lang="ts">
import { BrandApi } from '@/api/aib/brand';

defineOptions({ name: 'SelectBrandCom' })

const brandId = defineModel("value");
const brandOptions = ref([]) // 列表的数据

onMounted(() => {
  getList();
})

/** 查询列表 */
const getList = async () => {
  brandOptions.value = await BrandApi.getBrandSimpleList()
}

</script>

<template>
  <el-select v-model="brandId" clearable placeholder="请选择品牌" filterable>
    <el-option v-for="brand in brandOptions"
               :key="brand.id" :label="brand.name" :value="brand.id"/>
  </el-select>
</template>

<style scoped lang="scss">
.content {
  overflow: hidden;
}
</style>
